package com.cg.controller;

import com.cg.entity.Demo;
import com.cg.service.DemoService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author cheyinbo
 * @date 2021-04-06 18:29:04
 */
@RestController
@RequestMapping("/service")
@RequiredArgsConstructor
public class DemoController {

    private final DemoService demoService;

    @GetMapping("/demoTest")
    public List<Demo> demoTest(){
        return demoService.findList();
    }

}
